package com.github.ilioili.justdoit.util;

import android.view.View;

/**
 * Created by User on 16/6/20.
 */
public class ViewUtil {
    public static int[] getViewCenterLoc(View v){
        int[] loc = new int[2];
        v.getLocationInWindow(loc);
        loc[0] += v.getMeasuredWidth()/2;
        loc[1] += v.getMeasuredHeight()/2;
        return loc;
    }
}
